import Vue from 'vue'
import VueRouter from 'vue-router'
//登录页
import Login from "@/backend/Login"
//主页
import Home from "@/backend/Home"
//欢迎页
import Welcome from "@/backend/system/Welcome"
//系统管理
import Manager from "@/backend/system/Manager"//管理员列表
import Role from "@/backend/system/Role"//角色列表
import Permission from "@/backend/system/Permission"//权限列表
import SystemRecycle from "@/backend/system/SystemRecycle"//系统回收站
//宠物管理
import PetList from "@/backend/system/PetList"
//用户管理
import User from "@/backend/system/User"
//领养管理
import PetAdopt from "@/backend/system/PetAdopt"//领养申请列表
import OldPetAdopt from "@/backend/system/OldPetAdopt";//历史申请列表
//后台正常救助站
import RescueStation from "@/backend/system/RescueStation"
//后台已注销救助站
import OldRescueStation from "@/backend/system/OldRescueStation"
//文章管理
import PetArticleList from "@/backend/system/PetArticleList"
import PetArticleList2 from "@/backend/system/PetArticleList2";
//团队活动页
import Activity from "@/backend/system/Activity"
//往期活动页
import OldActivity from "@/backend/system/OldActivity"
//轮播图管理
import ViewPage from "@/backend/system/ViewPage"
//登录日志
import UserLogLogin from "@/backend/system/UserLogLogin";
//富文本编辑器
import quillEditor  from 'vue-quill-editor'

import 'quill/dist/quill.core.css' // 引入样式
import 'quill/dist/quill.snow.css' // snow theme
import 'quill/dist/quill.bubble.css' // bubble theme
import articleEditor from "@/backend/system/articleEditor";
//评论管理
import UserComment from "@/backend/system/UserComment";
//志愿者申请管理
import Apply from "@/backend/system/Apply";
//历史志愿者申请管理
import oldApply from "@/backend/system/OldApply";
//404 NOT FOUND
import NotFound from "@/backend/system/NotFound";

Vue.use(quillEditor )


Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'Login',
        component: Login,
        meta: {
            title: '管理员登录'
        }
    },
    {
        path: '/Login',
        name: 'Login',
        component: Login,
        meta: {
            title: '管理员登录'
        }
    },
    {
        path: '*',
        name: '/404',
        component: NotFound,
        meta: {
            title: '404 NotFound'
        }
    },
    {
        path: '/Home',
        name: 'Home',
        component: Home,
        children: [
            {
                path: '/',
                name: 'Welcome',
                component: Welcome,
                meta: {
                    title: '后台管理系统'
                },
            },
            {
                path: "/ManagerList",
                name: "Manager",
                component: Manager,
                meta: {
                    title: '后台|管理员列表'
                },
            },
            {
                path: "/RoleList",
                name: "Role",
                component: Role,
                meta: {
                    title: '后台|角色列表'
                },
            },
            {
                path: "/PermissionList",
                name: "Permission",
                component: Permission,
                meta: {
                    title: '后台|权限列表'
                },
            },
            {
                path: "/SystemRecycle",
                name: "SystemRecycle",
                component: SystemRecycle,
                meta: {
                    title: '后台|系统回收站'
                },
            },
            {
                path: '/petList',
                name: 'PetManagement',
                component: PetList,
                meta: {
                    title: '后台|宠物列表'
                },
            },
            {
                path: "/UserList",
                name: "User",
                component: User,
                meta: {
                    title: '后台|用户列表'
                },
            },
            {
                path: '/petAdopt',
                name: 'PetAdopt',
                component: PetAdopt,
                meta: {
                    title: '后台|领养申请列表'
                },
            },
            {
                path: '/oldPetAdopt',
                name: 'OldPetAdopt',
                component: OldPetAdopt,
                meta: {
                    title: '后台|领养申请历史列表'
                },
            },
            {
                path: '/RescueStation',
                name: 'RescueStation',
                component: RescueStation,
                meta: {
                    title: '后台|救助站列表'
                },
            },
            {
                path: '/OldRescueStation',
                name: 'OldRescueStation',
                component: OldRescueStation,
                meta: {
                    title: '后台|历史救助站列表'
                },
            },
            {
                path: "/petArticleList",
                name: "PetArticleList",
                component: PetArticleList2,
                meta: {
                    title: '后台|文章列表'
                },

            },
            {
                path: "/articleEditor",
                name: "articleEditor",
                component: articleEditor,
                meta: {
                    title: '后台|创建辑文章'
                }

            },
            {
                path: "/Activity",
                name: "Activity",
                component: Activity,
                meta: {
                    title: '后台|团队活动列表'
                },
            },
            {
                path: "/OldActivity",
                name: "OldActivity",
                component: OldActivity,
                meta: {
                    title: '后台|往期团队活动列表'
                },
            },
            {
                path: "/viewPage",
                name: "ViewPage",
                component: ViewPage,
                meta: {
                    title: '后台|轮播图列表'
                },
            },
            {
                path: "/userLogLogin",
                name: "UserLogLogin",
                component: UserLogLogin,
                meta: {
                    title: '后台|前台用户登录日志'
                },
            },
            {
                path:"/UserComment",
                name:"UserComment",
                component:UserComment,
                meta: {
                    title: '后台|用户评论列表'
                },
            },
            {
                path:"/ApplyList",
                name:"Apply",
                component:Apply,
                meta: {
                    title: '后台|志愿者申请列表'
                },
            },
            {
                path:"/oldApplyList",
                name:"oldApply",
                component:oldApply,
                meta: {
                    title: '后台|历史志愿者申请列表'
                },
            },
        ]
    },
    // {
    //     path: "/petArticleList/articleEditor",
    //     name: "articleEditor",
    //     component: articleEditor,
    //     meta: {
    //         title: '后台|编辑文章'
    //     }
    //
    // }

]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
